import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '项目',
    align: 'center',resizable: true,
    dataIndex: 'projectId_dictText',
   width:200,
  },
  {
    title: '项目编号',
     align: 'center',resizable: true, 
    dataIndex: 'projectNumber'
  },
  {
    title: '所属库',
     align: 'center',resizable: true, 
    dataIndex: 'libraryId_dictText'
  },
  {
    title: '总包主体',
     align: 'center',resizable: true, 
    dataIndex: 'companyInfoId_dictText'
  },
   {
    title: '发包单位',
     align: 'center',resizable: true,
    dataIndex: 'contractingUnit_dictText'
  },
  {
    title: '付款合计',
     align: 'center',resizable: true, 
    dataIndex: 'paymentTotal'
  },
  {
    title: '收票合计',
     align: 'center',resizable: true, 
    dataIndex: 'receiptsAndTaxTotal'
  },
  {
    title: '子项目合同金额合计',
     align: 'center',resizable: true, 
    dataIndex: 'subProjectAmount'
  },
  {
    title: '质保金合计',
     align: 'center',resizable: true, 
    dataIndex: 'totalGuaranteeDeposit'
  },
  {
    title: '费用报销',
     align: 'center',resizable: true, 
    dataIndex: 'reimbursement'
  },
  {
    title: '项目收款',
     align: 'center',resizable: true, 
    dataIndex: 'totalReceipts'
  },
  {
    title: '未收票金额',
     align: 'center',resizable: true, 
    dataIndex: 'uncollectedAmount'
  },
  {
    title: '未收款',
     align: 'center',resizable: true, 
    dataIndex: 'uncollectedPayment'
  },
  {
    title: '可用余额',
     align: 'center',resizable: true, 
    dataIndex: 'availableBalance'
  },
  {
    title: '主项目合同金额',
     align: 'center',resizable: true, 
    dataIndex: 'contractPrice'
  },

];

// 高级查询数据
export const superQuerySchema = {
  projectId: {title: '项目',order: 0,view: 'list', type: 'string',dictTable: "c_project_application", dictCode: 'id', dictText: 'project_name',},
  projectNumber: {title: '项目编号',order: 1,view: 'text', type: 'string',},
  libraryId: {title: '所属库',order: 2,view: 'list', type: 'string',dictTable: "c_library", dictCode: 'id', dictText: 'name',},
  companyInfoId: {title: '总包主体',order: 3,view: 'list', type: 'string',dictTable: "c_company_info", dictCode: 'id', dictText: 'company_name',},
  paymentTotal: {title: '付款合计',order: 4,view: 'number', type: 'number',},
  receiptsAndTaxTotal: {title: '收票合计',order: 5,view: 'number', type: 'number',},
  subProjectAmount: {title: '子项目合同金额合计',order: 6,view: 'number', type: 'number',},
  totalGuaranteeDeposit: {title: '质保金合计',order: 7,view: 'number', type: 'number',},
  reimbursement: {title: '费用报销',order: 8,view: 'number', type: 'number',},
  totalReceipts: {title: '项目收款',order: 9,view: 'number', type: 'number',},
  uncollectedAmount: {title: '未收票金额',order: 10,view: 'number', type: 'number',},
  uncollectedPayment: {title: '未收款',order: 11,view: 'number', type: 'number',},
  availableBalance: {title: '可用余额',order: 12,view: 'number', type: 'number',},
  contractPrice: {title: '主项目合同金额',order: 13,view: 'number', type: 'number',},
  contractingUnit: {title: '发包单位',order: 14,view: 'list', type: 'string',dictTable: "c_contracting_unit", dictCode: 'id', dictText: 'name',},
};

export const innerColumns: BasicColumn[] = [
    {
      title: '子项目名称',
      align: 'center',resizable: true,
      width: 200,
      dataIndex: 'subProjectId_dictText',
    },
      {
      title: '权限用户',
      align: 'center',resizable: true,
      width: 200,
      dataIndex: 'userId_dictText',
    },
       {
      title: '分包商',
      align: 'center',resizable: true,
      width: 200,
      dataIndex: 'contactId_dictText',
    },
    {
      title: '收票合计',
       align: 'center',resizable: true, 
      dataIndex: 'receiptsAndTaxTotal',
    },
    {
      title: '项目合同金额',
       align: 'center',resizable: true, 
      dataIndex: 'subProjectAmount',
    },
    {
      title: '质保金合计',
      dataIndex: 'totalGuaranteeDeposit',
       align: 'center',resizable: true, 
    },
     {
      title: '质保金合计',
      dataIndex: 'totalGuaranteeDeposit',
       align: 'center',resizable: true,
    },
     {
      title: '质保金合计',
      dataIndex: 'totalGuaranteeDeposit',
       align: 'center',resizable: true,
    },
  ];
